package com.example.emos.wx.core.config;

import com.rabbitmq.client.ConnectionFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * RabbitMQ配置类
 * @Author YinXi
 * @Versin 1.0.0
 * @Date 2023/9/12
 */
@Configuration
public class RabbitMQConfig {
    @Bean
    public ConnectionFactory getFactory(){
        ConnectionFactory factory = new ConnectionFactory();
        factory.setHost("127.0.0.1");//主机的IP地址
        factory.setPort(5672);//RabbitMQ的使用端口号
        return factory;
    }
}
